<?php
    echo "<p class='banner' align='right' onmousedown='tekan(event);' onmousemove='gerak(event);' onmouseup='lepas();' onmouseout='lepas();'> <a href='Javascript:close_slip()'> <img src='../../img/no4.gif' alt='[ X ]'></a></p>";
    echo "<hr color='#ccc'>";
    echo "<div class='form'>";
    echo "<h2> Qualification Matched </h2>";
    echo "<hr color='#2A7EF7'>";
    
        echo "<div class='kotak2'>";
        
            echo "<div class='input'>";
            if($jobseeker['jobseekers']['city_id'] == $job['jobs']['city_id'])
            { echo "<label>Lokasi </label><font color='#7EF72A'><b>Qualified</b></font>";   }
            else                                               
            { echo "<label>Lokasi </label><font color='red'><b>Not Qualified</b></font>"; }
            echo "</div>";
            
            echo "<div class='input'>";
            if($resume['resumes']['academic_id'] >= $job['jobs']['academic_id'])
            { echo "<label>Kualifikasi Pendidikan </label><font color='#7EF72A'><b>Qualified</b></font>";   }
            else
            { echo "<label>kualifikasi Pendidikan </label><font color='red'><b>Not Qualified</b></font>";   }
            echo "</div>";
            
            echo "<div class='input'>";
            if($resume['resumes']['year_exp'] >= $job['jobs']['experience'])
            { echo "<label>Pengalaman Kerja </label><font color='#7EF72A'><b>Qualified</b></font>";   }
            else
            { echo "<label>Pengalaman Kerja </label><font color='red'><b>Not Qualified</b></font>";   }
            echo "</div>";
            
            echo "<div class='input'>";
            if($job['jobs']['negotiable']!=1)
            {
                $qualified = true;
                if( $job['jobs']['salary']==1 && $resume['resumes']['salary']>MAX_SALARY_1 )
                { $qualified = false; }
                if( $job['jobs']['salary']==2 && $resume['resumes']['salary']>MAX_SALARY_2 )
                { $qualified = false; }
                if( $job['jobs']['salary']==3 && $resume['resumes']['salary']>MAX_SALARY_3 )
                { $qualified = false; }
                if($qualified)
                { echo "<label>Gaji </label><font color='#7EF72A'><b>Sesuai</b></font>";   }
                else
                { echo "<label>Gaji </label><font color='red'><b>Tidak Sesuai</b></font>";   }
            }
            echo "</div>";
            
            
            $temp = '';
            foreach($skills as $skill)
            {
                if ( strpos( strtolower($job['jobs']['criteria']), strtolower($skill['skills']['name'])) )
                { $temp .= $skill['skills']['name'].","; }
            }
            
            if($temp)
            {
                echo "<div class='input'>";
                    echo "<label>Kemampuan</label>".substr($temp,0,strlen($temp)-1);;
                echo "</div>";
            }
            
            $temp = '';
            foreach($languages as $language)
            {
                if ( strpos( strtolower($job['jobs']['criteria']), strtolower($language['languages']['name'])) ) 
                { $temp.=$language['languages']['name'].","; }
            } 
            if($temp)
            {
                echo "<div class='input'>";
                    echo "<label>Bahasa</label>".substr($temp,0,strlen($temp)-1);;
                echo "</div>";
            }            
            
            $temp = '';
            $certificates = explode(",",$resume['resumes']['certificate']);
            foreach($certificates as $certificate)
            {
                if ( strpos( strtolower($job['jobs']['criteria']), strtolower($certificate)) ) 
                { $temp.=$certificate.","; } 
            }    
            if($temp)
            {
                echo "<div class='input'>";
                    echo "<label>Sertifikat</label>".substr($temp,0,strlen($temp)-1);;
                echo "</div>";
            }        
        
        
        echo "</div>";
    echo "</div>";    
?>